package com.cn.jdia.tas.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cn.jdia.tas.dao.T_tasaccessMapper;
import com.cn.jdia.tas.model.T_tasaccess;
import com.cn.jdia.tas.service.ITasAccessService;

@Service("accessService")
public class ITasAccessServiceImpl implements ITasAccessService {

	@Resource
	private T_tasaccessMapper accessDao;
	
	@Override
	public T_tasaccess checklogin(String acount, String pwd) {
		return this.accessDao.querylogininfo(acount, pwd);
	}

	@Override
	public int modifyPassword(String id, String oldpwd, String newpwd) {
		return this.accessDao.updatePassword(id, oldpwd, newpwd);
	}

	@Override
	public int getParentDeptMemberCount(String parentDeptid) {
		return this.accessDao.queryParentDeptMemberCount(parentDeptid);
	}

	@Override
	public int getChildDeptMemberCount(String childDeptid) {
		return this.accessDao.queryChildDeptMemberCount(childDeptid);
	}

	@Override
	public T_tasaccess getDeptAuthority(String employeeid) {
		return this.accessDao.selectDeptAuthority(employeeid);
	}

}
